<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>分享</title>
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../css/font/iconfont.css" />
    <style>
        .adtest {
            height: 40px;
            border: 1px solid #666666;
            border-radius: 4px;
            line-height: 40px;
            text-align: center;
            width: 200px;
            margin: 10px;
        }

        .appcon {}

        .form_con {
            margin: 10px 12px;
        }

        .form_con section {
            padding-top: 5px;
            padding-bottom: 9px;
            border-bottom: 1px solid #dddddd;
            margin: 12px 2px;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
        }

        .form_con p {
            color: #333333;
            text-align: center;
            margin: 22px 12px;
        }

        .form_con section span {
            width: 30%;
            padding-left: 12px;
        }

        .form_con section input {
            width: 65%;
        }

        .cwhite {
            color: #ffffff;
        }

        .backred2 {
            background-color: #FE3665;
        }

        .backred3 {
            background-color: #fa9eb3;
        }

        .h30 {
            height: 30px;
        }

        .l30 {
            line-height: 30px;
        }

        .br15px {
            border-radius: 15px;
        }

        .w100p {
            width: 100px;
        }

        .mlp15 {
            margin-left: 15%;
        }

        .mrp15 {
            margin-right: 15%;
        }

        .tablelist {
            background: rgb(247, 203, 195);
            background: linear-gradient(164deg, rgba(247, 203, 195, 1) 2%, rgba(254, 230, 230, 1) 91%);
            margin: 12px 12px;
            padding: 4px 8px;
            border-radius: 4px;
            min-height: 90px;
        }

        .itemline {
            margin: 5px 2px;
            padding: 8px 4px 8px 4px;
            border-bottom: 1px dotted #fffffF;
        }

        .itemline label {}

        .flexrow {
            display: flex;
            flex-direction: row;
        }

        .flexbetween {
            justify-content: space-between;
        }

        .dongfont {
            color: crimson;
        }

        .jiefont {
            color: rgb(12, 70, 37);
        }

        .notokfont {
            color: #666666;
        }

        .notice {
            background-color: rgb(249, 217, 203);
            height: 100px;
            margin: 20px 20px;
            line-height: 25px;
            text-align: center;
            font-size: 14px;
            border-radius: 4px;
        }

        .mymsg {
            background-color: rgb(249, 217, 203);
            height: 60px;
            margin: 20px 20px;
            line-height: 25px;
            text-align: center;
            font-size: 14px;
            border-radius: 4px;
        }

        .active {
            color: darkgreen;
        }
    </style>
</head>

<body>
    <div class="page" @vue:mounted="mounted">
        <div class="nav-bar">
            <div onclick="core.back()" class="nav-bar-back">
                <span class="icon iconfont icon-fanhui m_r_10"></span>
                <span class="nav-bar-back-text">返回</span>
            </div>
            <span class="nav-bar-title">{{data.title}}</span>
        </div>
        <div class="scroll-view-y flex">

            <div class="appcon" v-if="data.acts.trans">
                <div class="form_con">
                    <p>
                        您当前有效金币是{{data.coinOK.toFixed(2)}}
                    </p>
                    <section>
                        <span>手机号</span>
                        <input v-model="data.tphone" placeholder="手机号" maxlength="20" />
                    </section>
                    <section>
                        <span>转让数量</span>
                        <input v-model="data.tnum" placeholder="转输入转让金币个数" maxlength="20" />
                    </section>
                    <section>
                        <button class="mlp15  backred2 cwhite w100p h30 tac l30 br15px" @click="dotrans()">提交</button>
                        <button class="mrp15  backred3 cwhite w100p h30 tac l30 br15px"
                            onclick="window.core.back();">取消</button>
                    </section>
                </div>
                <div class="notice">请用对方手机号转账，收取40%手续费。</div>
            </div>
            <div class="appcon" v-if="data.acts.coinbill">
                <div class="tablelist">
                    <div class="itemline flexrow flexbetween ">
                        <label style="width: 36%;">内容</label>
                        <label>金币</label>
                        <label>时间</label>
                    </div>
                    <div class="itemline flexrow flexbetween " v-for="item of data.coinList">
                        <label style="width: 36%;">{{item.title}}</label>
                        <label> <span v-if="item.coin>0"
                                :class="item.systype=='c1'?'dongfont':'jiefont'">{{item.systype=="c1"?"冻结":"解冻"}}</span>
                            <span v-if="item.coin>0" :class="item.ok?'jiefont':'notokfont'">{{item.ok?"到账":"未到"}}</span>
                            <span v-if="item.coin<0" style=" color:crimson">提现</span>
                            <span>{{item.coin/10000}}</span>
                        </label>
                        <label>{{item.create_date.substr(5,11)}}</label>
                    </div>
                </div>
            </div>

            <div class="appcon" v-if="data.acts.mbill">
                <div class="tablelist">
                    <div class="itemline flexrow flexbetween ">
                        <label style="width: 36%;">标题</label>
                        <label>金额</label>
                        <label>时间</label>
                    </div>
                    <div class="itemline flexrow flexbetween " v-for="item of data.mgotList">
                        <label style="width: 36%;">{{item.title}}</label>
                        <label>


                            <span style="width:40px;">{{item.money}}</span>
                            <span :class="item.moneygot>0?'jiefont':'notokfont'">{{item.moneygot>0?"到账":"审核中"}}</span>
                        </label>
                        <label>{{item.create_date.substr(5,11)}}</label>
                    </div>
                </div>
            </div>

            <div class="appcon" v-if="data.acts.myshare">
                <div class="notice" id="sharetxt" @click="doshare">
                    我是{{data.mobileshort }},
                    <br />我的分享码：{{data.shareCode}} ,
                    <div class=" backred2 cwhite w100p h30 tac l30 br15px" style="margin-top: 10px; margin:10px auto ;">
                        现在分享</div>

                </div>
                <div class="notice" id="sharetxt" @click="doshareimg">
                    我的分享码：{{data.shareCode}} ,
                    <div class=" backred2 cwhite w100p h30 tac l30 br15px" style="margin-top: 10px; margin:10px auto ;">
                        分享图片</div>


                </div>
                <div class="tablelist">
                    <div class="itemline flexrow flexbetween ">
                        <label style="width: 36%;">手机号</label>
                        <label>姓名</label>
                        <label>金币</label>
                        <label>时间</label>
                    </div>

                    <div class="itemline flexrow flexbetween " v-for="item of data.myshareList">
                        <label style="width: 36%;">{{item.phone}} <text class="active"
                                v-if="item.actH<72">活跃</text></label>
                        <label>{{item.cname}}</label>
                        <label>{{(item.coinsall/10000).toFixed(2)}}</label>
                        <label>{{item.create_date.substr(5,5)}}</label>
                    </div>
                </div>
                <div class="notice" v-if="data.myshareList.length<1">暂无分享记录，请分享</div>
                <div class="mymsg" v-if="data.myshareList.length>0">我的分享共{{data.myshareList.length}}人</div>
            </div>


            <div class="appcon" v-if="data.acts.mygift">

                <div class="tablelist">
                    <div class="itemline flexrow flexbetween ">
                        <label style="width: 36%;">手机号</label>
                        <label>姓名</label>
                        <label>时间</label>
                    </div>

                    <div class="itemline flexrow flexbetween " v-for="item of data.myshareList">
                        <label style="width: 36%;">{{item.phone}} <text class="active"
                                v-if="item.actH<72">活跃</text></label>
                        <label>{{item.cname}}</label>

                        <label>{{item.create_date.substr(5,11)}}</label>
                    </div>
                </div>
                <div class="notice" v-if="data.myshareList.length<1">暂无提成记录，请分享和指导学员。</div>
                <div class="mymsg" v-if="data.myshareList.length>0">我的分享共{{data.myshareList.length}}人</div>
            </div>

            <div class="appcon" v-if="data.acts.setAli">
                <div class="form_con">
                    <p>
                        设置支付宝
                    </p>
                    <section>
                        <span>姓名</span>
                        <input type="text" v-model="data.ali.name" placeholder="请填写姓名" maxlength="20" />
                    </section>
                    <section>
                        <span>支付宝</span>
                        <input type="text" v-model="data.ali.ali" placeholder="请填写支付宝" maxlength="20" />
                    </section>
                    <section>
                        <button class="mlp15  backred2 cwhite w100p h30 tac l30 br15px" @click="saveAli()">保存</button>
                        <button class="mrp15  backred3 cwhite w100p h30 tac l30 br15px"
                            onclick="window.core.back();">取消</button>
                    </section>
                </div>
            </div>

            <div class="appcon" v-if="data.acts.getm">
                <div class="form_con">
                    <p>
                        您当前有{{data.coinOK.toFixed(2)}}个有效金币，可提现金额是{{data.coinM.toFixed(2)}}元。

                    </p>
                    <p v-if=" data.user.lockcname">您原来成功提现过，锁定支付宝了.</p>
                    <p v-if="!data.user.lockcname" style="color: #ff0000; " @click="gosetAli()">您可以点击设置支付宝</p>
                    <p v-if="!data.user.lockcname" style="color: #ff0000; " @click="gogetMBank()">没有支付宝，可以提现到银行</p>
                    <p v-if="data.user.bank!='' && data.user.bank!=null && data.user.bank.length>2   "
                        style="color: #ff0000; " @click="gogetMBank()">您已经锁定提现到银行，请提到到银行.</p>
                    <section v-if=" data.user.bank==''||  data.user.bank==null  ">
                        <span>姓名</span>
                        <span>{{data.user.cname}}</span>
                    </section>
                    <section v-if=" data.user.bank==''||  data.user.bank==null  ">
                        <span>支付宝</span>
                        <span>{{data.ali.ali}}</span>
                    </section>
                    <section v-if="data.user.bank==''||  data.user.bank==null  ">
                        <span>金额</span>
                        <input v-model="data.mGet" type="number" placeholder="请填写提现金额" maxlength="20" />
                    </section>
                    <section v-if=" data.user.bank==''||  data.user.bank==null  ">
                        <span>备注</span>
                        <input v-model="data.mGetNote" type="text" placeholder="请填写提现备注." maxlength="20" />
                    </section>
                    <section>
                        <button v-if=" data.user.bank==''||  data.user.bank==null   "
                            class="mlp15  backred2 cwhite w100p h30 tac l30 br15px" @click="saveMGet()">提现</button>
                        <button class="mrp15  backred3 cwhite w100p h30 tac l30 br15px"
                            onclick="window.core.back();">取消</button>
                    </section>
                    <section style="color: #ff0000; line-height: 28px; ">
                        最低提现0.11元。将金币方式赠送10%金额给您的推荐人。
                        <br />
                        第一次提现时，请点击上面的红字设置支付宝。
                        <br />
                        没有支付宝，提现到银行卡时，点上面的红字进入。
                    </section>
                </div>
            </div>

            <div class="appcon" v-if="data.acts.getmBank">
                <div class="form_con">
                    <p>
                        您当前有{{data.coinOK.toFixed(2)}}个有效金币，可提现金额是{{data.coinM.toFixed(2)}}元。

                    </p>

                    <p style="color: #999999; ">第一次成功提现后，将锁定姓名和卡号.</p>

                    <section>
                        <span>姓名</span>
                        <span><input v-model="data.user.cname" type="text" placeholder="请填写提现金额" maxlength="20" />
                        </span>
                    </section>
                    <section>
                        <span style="width:130px;">卡号</span>
                        <span style="width:250px;">
                            <input style="width:210px;  " v-model="data.user.banknum" type="number"
                                placeholder="请填写提现金额" maxlength="29" /></span>
                    </section>
                    <section>
                        <span>银行</span>
                        <span> <input v-model="data.user.bank" type="text" placeholder="请填写提现金额"
                                maxlength="20" /></span>
                    </section>
                    <section>
                        <span>金额</span>
                        <input v-model="data.mGet" type="number" placeholder="请填写提现金额" maxlength="20" />
                    </section>
                    <section>
                        <span>备注</span>
                        <input v-model="data.mGetNote" type="text" placeholder="请填写提现备注." maxlength="20" />
                    </section>
                    <section>
                        <button class="mlp15  backred2 cwhite w100p h30 tac l30 br15px"
                            @click="saveMGetBank()">确认提现</button>
                        <button class="mrp15  backred3 cwhite w100p h30 tac l30 br15px"
                            onclick="window.core.back();">取消</button>
                    </section>
                    <section>
                        银行卡最低提现10元。将金币方式赠送10%金额给您的推荐人。
                    </section>
                </div>
            </div>

            <div class="appcon" v-if="data.acts.ad">
                <div class="adtest" @click="testAD(item)" v-for="item of data.ads">
                    {{item.l!=undefined ?item.l:item.ad }}
                </div>
            </div>
        </div>
    </div>
</body>

<script src="../script/api.js"></script>
<script src="../script/common.js?asd"></script>

<script type="module">
    import { createApp } from 'https://www.chenxiangle.com/app/web/script/pvue.js';
    // import ads from '../script/ads.js?2asds'
    const APP = () => {
        createApp({
            data: {
                user: {},
                title: "",
                taskList: [],
                acts: {},
                // ads: ads.adlist,
                ali: { name: '', ali: '' },
                coinList: [],
                mALL: 0,
                mOK: 0,
                mGet: 0,
                mGetNote: "",
                coinLock: 0,
                coinOK: 0,
                coinM: 0,
                mgotList: [],
                myshareList: [],
                shareCode: "",
                tphone: "",
                tnum: 0,
                mobile: "",
                mobileshort: "",
                mbanknum: "",
                mbank: "",
            },
            async testAD(item) {
                core.log(item);
                let sys = api.systemType;
                let dt = { type: item.ad, sys };
                core.log(dt);
                let res = await core.post("appad/ad01", dt);
            },
            act_ad() {
                if (api.systemType == "android") {
                    // ads.initAdCSJ();
                }
            },
            async dotrans() {
                var dt = {
                    phone: this.data.tphone,
                    num: this.data.tnum,
                }

                let res = await core.post("app/trans", dt);
                if (res.code == 1) {
                    api.alert({ msg: "对方手机号错误" });
                    return
                }

                core.log(res);
                api.execScript({
                    frameName: 'task',
                    name: 'homepage',
                    script: 'window.app.loadCoin(); '
                });
                core.log(res);
                api.alert({ msg: "提现申请成功，请等待审核." })
                core.back();

            },
            doshare() {
                var wxPlus = api.require('wxPlus');
                wxPlus.shareText({
                    apiKey: 'wxdcd274893f06b0fd',
                    scene: 'session',
                    text: '辰乡乐分享,我是' + window.app.data.mobileshort + ',我的分享码是' + this.data.shareCode + ', https://www.hctxx.com.cn/app/?p=' + window.app.data.mobileshort + '&id=' + this.data.shareCode

                }, function (ret, err) {
                    if (ret.status) {
                        alert('分享成功');
                    } else {
                        alert(err.code);
                    }
                });
            },
            doshareimg() {
                this.loadAli();
                let pid = this.data.user.id;
                let phone = window.app.data.mobileshort;
                let code = this.data.shareCode;
                api.download({
                    url: "https://hc.6gcc.com/qrmini.jpg",
                    savePath: 'fs://qrmini.jpg',
                    report: true,
                    cache: true,
                    allowResume: true
                }, function (ret, err) {
                    if (ret.state == 1) {
                        let purl = "https://hc.6gcc.com/appad2/sharepng?id=" + pid + "&code=" + code + "&phone=" + phone;
                        console.log(purl);
                        api.download({
                            url: purl,
                            savePath: 'fs://qrm6.png',
                            report: true,
                            cache: false,
                            allowResume: true
                        }, function (ret3, err3) {
                            if (ret3.state == 1) {

                                var wxPlus = api.require('wxPlus');
                                wxPlus.shareImage({
                                    apiKey: 'wxdcd274893f06b0fd',
                                    scene: 'session',
                                    thumb: 'fs://qrmini.jpg',
                                    contentUrl: 'fs://qrm6.png'
                                }, function (ret, err) {
                                    if (ret.status) {
                                        alert('分享成功');
                                    } else {
                                        alert(err.code);
                                    }
                                });
                            } else {

                            }
                        });
                    } else {

                    }
                });

                return;
                wxPlus.shareImage({
                    apiKey: 'wxdcd274893f06b0fd',
                    scene: 'session',
                    thumb: 'widget://images/main1/wx.png',
                    contentUrl: 'widget://images/main1/wx.png'
                }, function (ret, err) {
                    if (ret.status) {
                        alert('分享成功');
                    } else {
                        alert(err.code);
                    }
                });
            },
            gosetAli() {
                api.openWin({
                    name: 'setali',
                    url: './usertask.html?act=setAli&z=' + Math.random(),
                })
            },
            gogetMBank() {
                api.openWin({
                    name: 'setbank',
                    url: './usertask.html?act=getmBank&z=' + Math.random(),
                })
            },
            async loadAli() {
                this.loadUser();
                let user = await core.user();
                core.log('获取分享吗');
                core.log(user);
                this.data.ali.ali = user.ali;
                this.data.ali.name = user.name;
                this.data.shareCode = user.otherscode;

            },
            async saveMGet() {
                if (this.data.mGet < 0.11 || this.data.mGet > 1000) {
                    api.alert({ msg: "金额错误." });
                    return;
                }
                if (this.data.mGet > this.data.coinM) {
                    api.alert({ msg: "超过可提现金额." });
                    return;
                }
                let dt = {
                    m: this.data.mGet,
                    note: this.data.mGetNote
                };

                core.log(dt);
                let res = await core.post("appad/setMGet", dt);
                // this.loadCoin();
                api.execScript({
                    frameName: 'task',
                    name: 'homepage',
                    script: 'window.app.loadCoin(); '
                });
                core.log(res);
                api.alert({ msg: "提现申请成功，请等待审核." })
                core.back();

            },
            async saveMGetBank() {
                if (this.data.mGet < 0.1 || this.data.mGet > 1000) {
                    api.alert({ msg: "金额错误." });
                    return;
                }
                if (this.data.mGet > this.data.coinM) {
                    api.alert({ msg: "超过可提现金额." });
                    return;
                }

                if (this.data.mGet < 10) {
                    api.alert({ msg: "银行卡最低提现10元." });
                    return;
                }
                let dt = {
                    m: this.data.mGet,
                    note: this.data.mGetNote,
                    banknum: this.data.user.banknum,
                    bank: this.data.user.bank
                };

                core.log(dt);
                let res = await core.post("appad/setMGetBank", dt);
                // this.loadCoin();
                api.execScript({
                    frameName: 'task',
                    name: 'homepage',
                    script: 'window.app.loadCoin(); '
                });
                core.log(res);
                api.alert({ msg: "提现申请成功，请等待审核." })
                core.back();

            },
            async saveAli() {
                let dt = this.data.ali;
                core.log(dt);
                let res = await core.post("appad/setAli", dt);
                // window.app.loadAli();
                api.execScript({
                    name: 'usertaskgetm',
                    script: 'window.app.loadAli();'
                });
                core.log(res);
                api.alert({ msg: "支付宝保存成功" })
                core.back();

            },
            async loadCoin() {
                let res = await core.post("app/myCoin", {}, {});
                core.log(res);

                this.data.coinLock = res.all.coinLock;
                this.data.coinOK = res.all.coinOK;
                this.data.coinM = res.all.coinM;
                //	this.coinList = res.data ;
            },
            acts: { //区分功能的统一入口.
                ad() { //广告列表
                    core.addLog("visit", "show", "广告列表");
                    if (api.systemType == "android") {
                        // ads.initAdCSJ();
                    }
                },
                getm() {  //提现
                    console.log(api.winName); //homepage   //usertaskgetm

                    core.addLog("visit", "set", "提现");
                    window.app.loadAli();
                    window.app.loadCoin();
                },
                getmBank() {  //提现
                    console.log(api.winName); //homepage   //usertaskgetm

                    core.addLog("visit", "set", "提现");
                    window.app.loadAli();
                    window.app.loadCoin();
                },
                trans() {  //转账.
                    core.addLog("visit", "set", "转金币");
                    window.app.loadCoin();
                },
                setAli() {  //转账.
                    core.addLog("visit", "set", "设置支付宝");
                    window.app.loadAli();
                },
                async coinbill() {
                    core.addLog("visit", "set", "金币流水");
                    let dt = {};
                    let res = await core.post("app/coinList", dt, {});
                    core.log(res);
                    window.app.data.coinList = res.data;
                },
                async mbill() {
                    core.addLog("visit", "set", "提现记录");
                    let dt = {};
                    let res = await core.post("app/mgotList", dt, {});
                    core.log(res);
                    window.app.data.mgotList = res.data;
                },
                async myshare() {
                    window.app.loadAli();
                    let dt = {};
                    let res = await core.post("appad/myshare", dt, {});
                    window.app.data.myshareList = res.data;
                    let user = await core.user();

                    window.app.data.mobile = user.mobile;
                    window.app.data.mobileshort = user.mobile.substring(0, 3) + "****" + user.mobile.substring(7);

                }
                ,
                async mygift() {

                    return;
                    window.app.loadAli();
                    let dt = {};
                    let res = await core.post("appad/myshare", dt, {});
                    window.app.data.myshareList = res.data;
                    let user = await core.user();

                    window.app.data.mobile = user.phone;
                    window.app.data.mobileshort = user.phone.substring(0, 3) + "****" + user.phone.substring(7);

                }
            },
            actInit(act) {
                this.data.acts[act] = true;
                let titleConf = {
                    coinbill: "金币记录",
                    trans: "金币转让",
                    ad: "广告",
                    getm: "提现中心",
                    getmBank: "提现到银行卡",
                    setAli: "设置支付宝",
                    mbill: "提现记录",
                    myshare: "我的分享",
                    mygift: "我的提成",
                };
                if (titleConf[act] == "" || titleConf[act] == undefined) titleConf[act] = act;
                this.data.title = titleConf[act];
                if (this.acts[act] !== undefined) {
                    this.acts[act]();
                } else {
                    api.toast({ msg: act + '开发中' });
                }
            },
            async loadUser() {
                this.data.user = await core.user();
            },

            async AdRV(r) {
                let dt = {
                    sys: api.systemType,
                    id: r.id,
                    uid: this.data.uid,
                };
                let d = {}
                core.log(r);
                core.log(dt);

                let res = await core.post("appad/AdRV", dt, {}, {});
                core.log(res);
                if (res.code == 200) {
                    eval(res.adjs);
                }

            },
            async AdSplash(r) {
                let dt = {
                    sys: api.systemType,
                    id: r.id,
                    uid: this.data.uid,
                };


                let res = await core.post("appad/getAdSplash", dt, {}, {});

                if (res.code == 200) {
                    eval(res.adjs);
                }
            },

            async AdBanner(r) {
                let dt = {
                    sys: api.systemType,
                    id: r.id,
                    uid: this.data.uid,
                };

                core.log(dt);
                let res = await core.post("appad/getAdB", dt, {}, {});

                if (res.code == 200) {
                    eval(res.adjs);
                    console.log(res.adjs);
                }
            },
            async AdV(r) {
                let dt = {
                    sys: api.systemType,
                    id: r.id,
                    uid: this.data.uid,
                };

                core.log(dt);
                let res = await core.post("appad/getAdV", dt, {}, {});

                if (res.code == 200) {
                    eval(res.adjs);
                    console.log(res.adjs);
                }
            },
            showTask(obj) {

                let id = obj.id;
                let taskvar = obj.param;
                if (obj.param == "rvad") {
                    this.AdRV(obj);
                    return;
                }
                if (obj.param == "adsplash") {
                    this.AdSplash(obj);
                    return;
                }
                if (obj.param == "adv") {
                    this.AdV(obj);
                    return;
                }
                if (obj.param == "adbanner") {
                    this.AdBanner(obj)
                    return;
                }
                if (obj.param == "gourl") {

                    api.openWin({
                        name: 'gourl',
                        url: obj.url,
                    })
                    return;
                }
                api.openWin({
                    name: 'taskdetail',
                    url: './taskdetail.html?id=' + id + "&z=" + Math.random(),
                })
            },
            initCSJ() {
                if (api.systemType == "android") {
                    // ads.initAdCSJ();
                }
            },
            mounted() {
                window.app = this;
                let act = core.getParam("act");
                this.actInit(act);

                this.initCSJ();
                setTimeout(() => {
                    this.showTask({ id: 26, param: 'adbanner' })
                }, 3000);

                setTimeout(() => {
                    this.showTask({ id: 11, param: 'adsplash' })
                }, 115000);

            }
        }).mount()
    }

    window.apiready = () => {
        $api.fixStatusBar($api.dom('.nav-bar'));
        console.log(api.appName);
        APP();

    }

    setTimeout(() => {
        if (window.app === undefined) {
            APP();
        }
    }, 500);

</script>

</html>